package com.illtamer.infinite.sillage.exception;

import org.springframework.http.HttpStatus;

/**
 * Http 状态码异常
 * */
public class HttpStatusException extends SillageException {

    private final String reason;

    public HttpStatusException(HttpStatus httpStatus) {
        this(httpStatus.getReasonPhrase());
    }

    public HttpStatusException(String reason) {
        this.reason = reason;
    }

    @Override
    public String getMessage() {
        return reason;
    }
}
